package com.net.test.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.net.test.db.MybatisDAO;


@Service
public class LolService {
	@Autowired
	
	MybatisDAO mybatisDAO;
	
	public Object selectData(String id) throws Exception{
		
		Object lists = " ";
		
		lists=mybatisDAO.getListData(id);
		
		return lists;
		
		
	}
	public int insertData(String id, Object obj) throws Exception{
		
		int result = 0;
		
		result = mybatisDAO.insertData(id, obj);
		
		return result;
	}
	public Object ViewData(String id, String value) throws Exception {
		
		Object lists = " ";
		lists = mybatisDAO.getViewDataOne(id, value);
		
		return lists;
		
	}
	public int updateData(String id, Object obj) throws Exception {
		
		int result = 0;
		
		result = mybatisDAO.updateData(id, obj);
		
		return result;
		
		
	}
	public int deleteData(String id, Object obj) throws Exception{
		
		int result = 0;
		
		result = mybatisDAO.deleteData(id, obj);
		
		return result;
	}
	
	
	
	
}
